package ebuy.com.cotroller;

import ebuy.com.pojo.Commodity;
import ebuy.com.pojo.Goofs;
import ebuy.com.server.Goofssever;
import ebuy.com.util.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GoofsCotroller {
    @Autowired
    private Goofssever goofssever;
    @GetMapping("/good")
    public RespBean GetGood(Integer id){
        List<Commodity> getproductsaccordingtoid = goofssever.Getproductsaccordingtoid(id);
        return RespBean.success("查询成功",getproductsaccordingtoid);
    }
}
